Skip to content

[access] refactor(objects): the renderer takes three service bundles and its property guard - #7507

Merged
rubenvdlinde merged 4 commits into
mainfrom
cloud/k16-render-ctor
Nov 9, 2026
Merged

rubenvdlinde merged 4 commits into
mainfrom
cloud/k16-render-ctor

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Lane K16, round 10c — SIG unit interfacing.

What changed

  • RenderObject::__construct took 23 parameters. It now takes four:
    • RenderStores (RenderMappers: object/register/schema stores and the object cache; RenderFileSources: file mapper, file reader, system tag manager and mapper)
    • RenderEnrichers (RenderTranslations: translation handler, status, mapper, language service; RenderDerivations: computed fields, calculation evaluator, linked-entity enricher, URN service)
    • RenderRuntime (logger, RenderReadExtensions (object-source registry, field encryption, lens resolver — still nullable with null defaults), request, lazy container)
    • PropertyRbacHandler — the access guard stays a direct constructor parameter.
  • Every bundle is a final class of at most 4 promoted readonly properties, autowired by the container exactly like the controller *Services bundles. RenderObjectInterface → RenderObject binding is unchanged; no DI semantics change, no logic change — field reads only become $this->stores->mappers->schemaMapper and so on.
  • The ExcessiveParameterList suppression on the constructor is gone, since the warning is.
  • Every test that builds a RenderObject (21 constructions in 15 files, plus 5 tests that inject private properties into a bare instance) follows the new shape.

What ran (on the branch merged with current development)

  • tests/Unit/Service/Object/ — 4243 tests OK (1 skipped, pre-existing)
  • tests/Unit/Architecture, tests/Unit/Contract, tests/Unit/Kernel, tests/Unit/Service/Rules, ControllerServicesWiringTest, ControllerSessionWiringTest — 2658 tests OK
  • ObjectsControllerWriteOnlyListLeakTest, FileRestrictionRenderAndLinkTest, ExplicitRevealRoutesTest, LinkExposureWiringTest, SourceLanguageResolutionTableTest — OK
  • php -l, phpcs (0 errors; the one warning is the pre-existing missing class @spec), phpstan on touched files — OK

Numbers

RenderObject::__construct (23 params, 26 NLOC) leaves the > 4 and > 6 parameter bands: −26 LOC on each for the lane.

Written by an AI agent (Claude Code), reviewed by its own guards only.


Generated by Claude Code

…roperty guard

RenderObject::__construct took 23 parameters. It now takes the stores it
reads (mappers, files), the enrichers it adds (translations, derived
values), the runtime it works in (logger, request, lazy container and the
optional read extensions) and the property RBAC handler, which stays a
direct parameter as an access guard. Every bundle is autowired; the
nullable extensions keep their null defaults.

Assisted-by: ClaudeCode

Copy link
Copy Markdown
Contributor Author

Newman API Test Suite is red, and the failure is not this PR's.

The job runs the full unit suite: 11 errors and 11 failures. They are in JobRunMapperNarrowGoldenTest, FileVersioningHandlerGoldenTest, A18InterfaceBindingsTest (ObjectRetentionHandler), TextExtractionJobsGoldenTest, EndpointsControllerAnswersGoldenTest, SchemaConfigValidatorsGoldenTest and ProcessingLogServiceGoldenTest. None of them builds or calls RenderObject or the new render bundles, and all of them pass locally on this branch's head (230736d).

The same api-test-coverage workflow is also red on development itself, at the merges of #7468 and #7469, so this PR did not cause it. I have no fix to port for it. This branch gets no further pushes; per the lane brief, an opened PR is finished.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

quality / Frontend Check (test:l10n:parity) is red, and the failure is not this PR's.

This PR changes no file under l10n/ or src/. node tests/l10n/check-l10n-parity.js fails the same way on development itself (2b9263e): every finished locale is one key behind en.js, for example frontend (.js) de: 1 missing key(s). That is a new English string that reached development without its translations. It is the §6.15 procedure in docs/l10n-workflow.md and needs its own commit on development, not one here. I have no fix to port. This branch gets no further pushes; per the lane brief, an opened PR is finished.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

quality / Frontend Check (test:l10n) is red, and the failure is not this PR's.

node tests/l10n/check-l10n.js fails the same way on development itself. t()/n() keys used in src/modals/object/MassValidateObjects.vue (for example _Validate {count} object_::_Validate {count} objects_) are missing from l10n/en.js. This PR changes no file under src/ or l10n/. The fix is the §6.15 extraction and translation on development, in its own commit. This branch gets no further pushes; per the lane brief, an opened PR is finished.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

quality / PHP Quality (phpcs), Vue Quality (eslint) and Frontend Check (format) are red, and none of these failures is this PR's.

  • phpcs: every error is in a file this PR does not touch, and each one arrived on development: lib/Service/Flow/FlowTokenRouter.php, lib/Db/ImportPreviewRow.php, lib/Service/Object/SaveObject/RelationCascadeHandler.php, lib/Db/RuleRun.php, lib/Service/ContractBindings.php, lib/Db/MagicMapper/MagicObjectSearchInterface.php, lib/Db/EntityRelation.php and lib/Db/CaseItem.php. The files this PR changes are clean (vendor/bin/phpcs: 0 errors on RenderObject.php and the eight bundles).
  • eslint / format: both check only src/ frontend files, and this PR changes none.

The fixes belong on development. This branch gets no further pushes; per the lane brief, an opened PR is finished.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

quality / PHP Quality (psalm) is red, and the failure is not this PR's.

Psalm reports 60 errors across 35 files, for example lib/Db/FindLinksByObjectUuidTrait.php (15), lib/Db/MagicMapper/FacetResults.php, lib/Search/Controller/GraphQLController.php and lib/Service/Settings/ObjectRetentionHandler.php, plus stale UnusedBaselineEntry lines. None of them is in a file this PR changes: no error names RenderObject.php or any of the eight new Render* bundles. They came in with development, and the fixes belong there. This branch gets no further pushes; per the lane brief, an opened PR is finished.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

quality / PHP Quality (phpstan) is red, and the failure is not this PR's.

PHPStan finds 24 errors. All of them are in files this PR does not change: BackgroundJob/FileTextExtractionJob.php, Controller/EndpointsController.php, Controller/Support/RegisterStatistics.php, Controller/TaskNotesController.php, Controller/WebhooksController.php, Db/Tenancy/TenancyIdentityTrait.php, Notifications/Controller/NotesController.php, Search/Service/GraphQL/GraphQLService.php, Service/Flow/FlowService.php, Service/Import/ImportPreviewService.php, Service/Integration/BuiltinProviders/NotesProvider.php and Service/Task/TaskSequenceService.php. Most are calls to methods that are missing from interfaces on development (NoteServiceInterface::requireNoteOf, ImportPreviewRowMapperInterface::persist, TaskSequenceMapperInterface::update, and others). phpstan analyse on RenderObject.php and the eight new bundles reports no errors. The fixes belong on development. This branch gets no further pushes; per the lane brief, an opened PR is finished.


Generated by Claude Code

@rubenvdlinde
rubenvdlinde changed the base branch from development to main November 9, 2026 06:56

Copy link
Copy Markdown
Contributor Author

quality / Hydra Gates: one gate failure is this PR's, and the fix is on a separate branch.

  • gate-122 sig-maintainability is real and caused by this PR. The new lib/Service/Object/RenderMappers.php opened with the same preamble as BulkSaveStores.php and RelationHandlerStores.php: namespace plus the three Db\*MapperInterface imports in the same order. That counts as two new 6-line duplicated fragments. The fix writes those three types out in full where they are used, so the imports and the clone go away. It is commit 723a5ee on branch cloud/k16-render-mappers-dup, stacked on this PR's head. There, gate-122's ratchet reports 0 finding(s) across 69 changed units, and tests/Unit/Service/Object (4243), phpcs and phpstan pass. Per the lane brief, an opened PR is finished, so the fix was not pushed here. The coordinator can merge that branch into this one or merge it right after this PR.
  • gates 3, 7, 12, 17, 40, 46 and 49 are not this PR's. stub-scan, no-admin-idor, nc-input-labels, redundant-controller, form-label-association, spec-anchor-existence and controller-exception-translation all report on controllers, Vue templates, stubs and spec anchors that this PR does not touch.

Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

quality / PHP Quality (phpmd): two of its findings are this PR's, and the fix is on the same separate branch as the gate-122 fix.

The run reports 459 findings, almost all inherited from development. Two are new in this PR: LongVariable on $translationStatusService (RenderTranslations.php:47) and on $fieldEncryptionHandler (RenderReadExtensions.php:49). The new bundles don't carry the renderer's class-level suppression, and the lane adds no new @SuppressWarnings, so I renamed the two fields to translationStatus and fieldEncryption. Every read in RenderObject and every test that builds the bundles follows the rename. This is commit 5cc79e0 on cloud/k16-render-mappers-dup, on top of the gate-122 fix (723a5ee). On that branch phpmd reports nothing for the PR's files, gate-122 reports 0 finding(s), and tests/Unit/Service/Object (4243) plus the Architecture/Contract/Kernel/Rules/wiring guards (2658) pass. Per the lane brief, an opened PR is finished, so nothing was pushed here. Merging cloud/k16-render-mappers-dup into this PR, or right after it, clears both of this PR's own findings. #7539 and #7573 have no phpmd or gate-122 findings in their own files.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

quality / Integration Tests (Newman) is red: 1625 of 1628 assertions pass. The one failure I can see does not involve rendering; the other two I could not read.

This is the live-instance check that would catch a wiring fault in the new render bundles (RenderStores, RenderEnrichers, RenderRuntime). It shows none: all 39 collections ran with 0 request or script errors, and every object create, read, list, extend and relation request in them was answered through RenderObject. A container that could not build the renderer would fail every one of them.

The one failure visible in the part of the log the API returns is in a flow, not in rendering:
notify-on-change: no step failed — a step failed: expected 'n1: The call to source "2789dd7d-54ac…' to deeply equal '', inside "2 — Alter an object and notify a human / notify-on-change — assert effect". That is the flow's outbound call to a configured source failing. The log API only returns the last 5,000 lines, so I cannot see the other two failing assertions, and I cannot re-run the job from here. Someone with access to the full log, or the newman-*.json reports, can confirm them. I have no fix for this PR to carry. This branch gets no further pushes; per the lane brief, an opened PR is finished.


Generated by Claude Code

@rubenvdlinde
rubenvdlinde merged commit 0e1162f into main Nov 9, 2026
37 of 50 checks passed
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/openregister @ 30034b8

Check PHP Vue Security License Tests
lint ✅
phpcs ❌
phpmd ❌
psalm ❌
phpstan ❌
phpmetrics ✅
eslint ❌
stylelint ✅
build ✅
check-specs ✅
test-l10n ❌
test-l10n-parity ❌
format ❌
check-schema-l10n ✅
test-coverage-ratchet ✅
composer ✅ ✅ 168/168
npm ✅ ✅ 641/641
app:check-code ⏭️
info.xml ✅
REUSE ✅
lockfile sync ✅
PHPUnit ❌ cancelled — no verdict
Newman ❌ 1625/1628
Playwright ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development.
Hydra gates ❌

Quality workflow — 2026-11-09 12:16 UTC

Download the full PDF report from the workflow artifacts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants